package com.example.haosiji.activity;

import java.io.IOException;
import java.io.InputStream;

import com.example.haosiji.R;


import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class ActivityProtocol extends Activity{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.activityprotocol);
				
		try {  
			 
			  InputStream is = getAssets().open("service_agreement.txt");  
			  int size = is.available();  
 
			  byte[] buffer = new byte[size];
			   
			 
			  is.read(buffer);  
			  is.close();  
			   
			  String text = new String(buffer, "UTF-8");  
			    
			  TextView tv = (TextView) findViewById(R.id.protocoltext);  
			  tv.setText(text); 
			  
			} catch (IOException e) {   
			   throw new RuntimeException(e);  
			} 
		
		
		
	}	
}
